package com.fa4j.system.account.repository;

import com.fa4j.common.data.repository.BaseRepository;
import com.fa4j.common.web.model.AppType;
import com.fa4j.system.account.model.AccountBind;
import com.fa4j.system.login.model.LoginType;

import java.util.List;
import java.util.Optional;

/**
 * 账号绑定 持久化接口
 *
 * @since 2025-05-06 16:16:26
 */
public interface AccountBindRepository extends BaseRepository<AccountBind> {

    Optional<AccountBind> findAccountByOpenId(AppType appType, LoginType loginType, String thirdAppId, String thirdOpenId);

    List<AccountBind> queryAccountByUnionId(AppType appType, LoginType loginType, String thirdUnionId);

    List<AccountBind> queryByAccountIdAndType(Long accountId, LoginType loginType);
}
